import type { RouteRecordRaw } from 'vue-router'
import type { Route } from '#/global'
// 固定路由（默认路由）
// import multilevelMenuExample from './modules/multilevel.menu.example'
const constantRoutes: RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/index',
    },
    // 登录
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login.vue'),
        meta: {
            title: '登录',
        }
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('@/views/index.vue'),
        meta: {
            title: '首页',
        }
    },
    // 404
    {
        path: '/:all(.*)*',
        name: 'notFound',
        component: () => import('@/views/[...all].vue'),
        meta: {
            title: '404',
        }
    },
]








// // 动态路由（异步路由，导航栏路由）
// const asyncRoutes: Route.recordMainRaw[] = [
//     {
//         meta: {
//             title: '分组',
//             icon: 'i-uim:box'
//         },
//         children: [
//             multilevelMenuExample
//         ]
//     }
// ]




export {
    constantRoutes,
    // asyncRoutes,
}
